//
//  Student.h
//  Realm-demo
//
//  Created by 小菜 on 17/5/8.
//  Copyright © 2017年 蔡凌云. All rights reserved.
//

#import <Realm/Realm.h>
#import <UIKit/UIKit.h>
#import "Friend.h"

@interface Student : RLMObject

@property int num;
@property NSString *name;
@property(readonly) UIImage *image;
@property NSData *imageData;

// 存数租 -- 无法直接存储，可转成nsdata在存储
//@property NSArray<NSString *> *keys;

// 数组里面装的模型必须继承 RLMObject
//@property RLMArray *models;

@property RLMArray<Friend *><Friend> *models;

@end

// This protocol enables typed collections. i.e.:
// RLMArray<Student *><Student>
RLM_ARRAY_TYPE(Student)
